﻿<UserControl x:Class="tomenglertde.ResXManager.View.Visuals.ShellView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800"
             xmlns:visuals="clr-namespace:tomenglertde.ResXManager.View.Visuals"
             xmlns:properties="clr-namespace:tomenglertde.ResXManager.View.Properties"
             xmlns:styles="urn:ResXManager.Styles"
             xmlns:toms="urn:TomsToolbox"
             xmlns:infrastructure="urn:ResXManager.Infrastructure"
             UseLayoutRounding="True" TextOptions.TextFormattingMode="Display"
             d:DataContext="{d:DesignInstance visuals:ShellViewModel}">
  <UserControl.Style>
    <Style TargetType="UserControl">
      <Style.Triggers>
        <DataTrigger Binding="{Binding IsLoading}" Value="True">
          <Setter Property="Cursor" Value="{x:Static Cursors.Wait}"/>
        </DataTrigger>
      </Style.Triggers>
    </Style>
  </UserControl.Style>

  <Grid>
    <TabControl x:Name="TabControl"
                TabStripPlacement="Bottom"
                Padding="0" BorderThickness="1" Margin="-1,-1,-1,5" Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}"
                toms:VisualComposition.RegionId="{x:Static infrastructure:RegionId.Content}"
                Style="{DynamicResource {x:Static styles:ResourceKeys.TabControlStyle}}">
      <TabControl.ItemTemplate>
        <DataTemplate>
          <TextBlock Text="{Binding}"/>
        </DataTemplate>
      </TabControl.ItemTemplate>
    </TabControl>
    <Button x:Name="DonateButton" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="5,0"
            Background="Transparent" BorderBrush="Transparent"
            BorderThickness="0" ToolTip="{x:Static properties:Resources.DonateButtonToolTip}"
            Tag="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=TQQR8AKGNHELQ">
      <Button.Style>
        <Style TargetType="Button">
          <Setter Property="Opacity" Value="0.15" />
          <Style.Triggers>
            <EventTrigger RoutedEvent="MouseEnter">
              <BeginStoryboard Name="DonateMouseEnter">
                <Storyboard Duration="0:0:0.5" Storyboard.TargetProperty="Opacity">
                  <DoubleAnimation To="1.0" />
                </Storyboard>
              </BeginStoryboard>
            </EventTrigger>
            <EventTrigger RoutedEvent="MouseLeave">
              <BeginStoryboard Name="DonateMouseLeave">
                <Storyboard Duration="0:0:0.5" Storyboard.TargetProperty="Opacity">
                  <DoubleAnimation To="0.15" />
                </Storyboard>
              </BeginStoryboard>
            </EventTrigger>
          </Style.Triggers>
        </Style>
      </Button.Style>
      <Image SnapsToDevicePixels="True" Stretch="None" Source="/ResXManager.View;component/Assets/btn_donate_SM.gif" />
    </Button>
  </Grid>

</UserControl>